<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<link rel="stylesheet" type="text/css"	href="${pageContext.request.contextPath}/css/pager.css">
<!--分页-->
当前第[${page.curPage }]页&nbsp;&nbsp;&nbsp;
	<c:if test="${page.curPage>1}">
  	  <a href="javascript:void(0);" onclick="getPage(${page.curPage-1});">上一页</a>
    </c:if>&nbsp;
    <c:forEach var="pagenum" begin="${page.startPage}" end="${page.endPage}">
    	<a href="javascript:void(0);" onclick="getPage(${pagenum });">${pagenum }</a>
	</c:forEach>  
	&nbsp;
	<c:if test="${page.curPage<page.pageCount}">
		<a href="javascript:void(0);" onclick="getPage(${page.curPage+1});">下一页</a>
	</c:if>
	&nbsp;&nbsp;&nbsp;
	共[${page.pageCount }]页,共[${page.total}]纪录
<script>
	function getPage(curPage){
		$("#load").load("${page.url}",{curPage: curPage});
	}
	$(document).ready(
			function() {
				$("div.pager").find("span.active a").css("background-color",
						"#CCC");
				$("div.pager").find("span.pager_n").click(
						function() {
							$("div.pager").find("span.active a").removeAttr(
									"style");
							$("div.pager").find("span.active").removeClass(
									"active");
							$(this).addClass("active");
							$("div.pager").find("span.active a").css(
									"background-color", "#CCC");
						});

				$("div.pager").find("#previous").click(
						function() {
							$("div.pager").find("span.active").prev().addClass(
									"active");
							$("div.pager").find("span.active").last().find("a")
									.removeAttr("style");
							$("div.pager").find("span.active").last()
									.removeClass("active");
							$("div.pager").find("span.active a").css(
									"background-color", "#CCC");
						});

				$("div.pager").find("#next").click(
						function() {
							$("div.pager").find("span.active").next().addClass(
									"active");
							$("div.pager").find("span.active").first()
									.find("a").removeAttr("style");
							$("div.pager").find("span.active").first()
									.removeClass("active");
							$("div.pager").find("span.active a").css(
									"background-color", "#CCC");
						});

			});
</script> 